﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TinhChuViTamGiac
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            int x1 = int.Parse(txtX1.Text);
            int x2 = int.Parse(txtX2.Text);
            int x3 = int.Parse(txtX3.Text);
            int y1 = int.Parse(txtY1.Text);
            int y2 = int.Parse(txtY2.Text);
            int y3 = int.Parse(txtY3.Text);

            double c1 = Math.Sqrt(((x1 - x2) *( x1 - x2))+(y1 - y2) *( y1 - y2));
            double c2 = Math.Sqrt((x2 - x3) * (x2 - x3)+(y2 - y3) *( y2 - y3));
            double c3 = Math.Sqrt((x3 - x1) * (x3 - x1)+(y3 - y1) *( y3 - y1));
            lbKetQua.Text = (c1 + c2 + c3).ToString();
        }
    }
}
